STEP 20: One more activity! Let's finally use those helper functions provided at the top of our program.

  • Click on LOGIC. In , drag Function Call twice inside main().
  • Change the first call from my_function() to add_sprite_controls(sprite).
  • Change the second from my_function() to add_sprite_collision(sprite, start_coordinates).
  • Press Run and play the game! Avoid the red squares and get to the green square!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)